package com.graduate.game.topic.service;

import com.graduate.game.assignment.pojo.assignment;
import com.graduate.game.topic.pojo.comment;
import com.graduate.game.topic.pojo.topic;
import com.graduate.game.user.pojo.User;
import com.graduate.game.user.pojo.userdata;

import java.util.List;
import java.util.Map;

public interface TopicService {

    //查看topic表
    List<topic> lookAll();

    //随机获取数据，一条
    topic getrandomOneger();

    //通过ID获取一条数据
    topic getIDone(int themeid);

    //发布话题
    public boolean insertTopic(topic topic);

    //根据publisher获取此用户的全部数据
    public List<topic> getOneUser(String publisher);

    //模糊查询
    public List<topic> serchtopic(String title);

    //增肌游览次数
    public int addTopicnum(topic topic);

    //查询游览次数
    public int checkAnnext(int themeid);

    //分页查询
    List<topic> findAllBypage(Map<String,Object> data);

    //发布评论
    public boolean insertComment(comment comment);
    //查看全部评论
    public List<comment> getallcommnets(int themeid);

    //根据ID删除一条话题
    public boolean delById(long id);
}
